package com.d0312.Z12;

public class Person {
    //1
   /* public Person(String name,int age){
        System.out.println(name+"\t"+age);
    }
    public static void main(String[] args) {
        Person person=new Person("Lucy",21);

    }*/
   //2
    /*String name="Lucy";
    int age=22;

    public static void main(String[] args) {
        Person person=new Person();
        System.out.println(person.name+"\t"+person.age);
    }*/
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
class TestPerson{
    public static void main(String[] args) {
        Person person=new Person();
        person.setAge(22);
        person.setName("Lucy");
        System.out.println(person.getName());
        System.out.println(person.getAge());
    }
}
